/*
 * Copyright (c) 2021 Talkweb Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __MOTOR_H__
#define __MOTOR_H__

typedef enum
{
    OFF = 0,        //关
    ON              //开
} Motor_Status_ENUM;

/* E53_IA1传感器数据类型定义 ------------------------------------------------------------*/
typedef struct
{
    float    Lux;             //光照强度
    float    Humidity;        //湿度
    float    Temperature;     //温度
} Motor_Data_TypeDef;

// extern Motor_Data_TypeDef Motor_Data;

/* 寄存器宏定义 --------------------------------------------------------------------*/
#define SHT30_Addr 0x44
#define BH1750_Addr 0x23

void MotorInit(void);
void MotorReadData(Motor_Data_TypeDef *data);
void LightStatusSet(Motor_Status_ENUM status);
void MotorStatusSet(Motor_Status_ENUM status);

#endif

